/** 
  学生成绩信息
*/
<template>
  <div class="student-basic-info-container">
    <div style="height: 40px;">
      <el-breadcrumb separator="/" class="float-left" style="padding-top: 8px;">
        <el-breadcrumb-item :to="{ path: '/studentPerformMaintain' }">
          <span @click="backToMain()">{{ $t('studentPerformMaintain.studentPerformMaintain') }}</span>
        </el-breadcrumb-item>
        <el-breadcrumb-item>{{ $t('studentPerformMaintain.studentBasicInfo') }}</el-breadcrumb-item>
      </el-breadcrumb>
      <div class="float-right">
        <el-button type="text" @click="backToMain()">{{ $t('common.btn.back') }}</el-button>
      </div>
    </div>
    <el-card shadow="never" v-loading="loading" body-style="padding: 24px;">
      <div class="title">{{ $t('studentPerformMaintain.studentBasicInfo') }}</div>
      <table class="table-style-baseinfos">
        <tbody>
          <tr>
            <td class="text-right-background-color">{{ $t('scoreMangementBase.studentName') }}：</td>
            <td class="text-left-background-none">{{ basicInfo.name }}</td>
            <td class="text-right-background-color">{{ $t('scoreMangementBase.contactPhone') }}：</td>
            <td class="text-left-background-none">{{ basicInfo.phoneNumber }}</td>
          </tr>
          <tr>
            <td class="text-right-background-color">{{ $t('scoreMangementBase.campus') }}：</td>
            <td class="text-left-background-none">{{ basicInfo.campusI18n }}</td>
            <td class="text-right-background-color">{{ $t('scoreMangementBase.isInSchool') }}：</td>
            <td class="text-left-background-none">{{ basicInfo.isSchoolI18n }}</td>
          </tr>
          <tr>
            <td class="text-right-background-color">{{ $t('scoreMangementBase.trainingLevel') }}：</td>
            <td class="text-left-background-none">{{ basicInfo.trainingLevelI18n }}</td>
            <td class="text-right-background-color">{{ $t('scoreMangementBase.cultivationCategory') }}：</td>
            <td class="text-left-background-none">{{ basicInfo.trainingCategoryI18n }}</td>
          </tr>
          <tr>
            <td class="text-right-background-color">{{ $t('scoreMangementBase.inSchoolMethod') }}：</td>
            <td class="text-left-background-none">{{ basicInfo.enrolMethodsI18n }}</td>
            <td class="text-right-background-color">{{ $t('scoreMangementBase.specialPlan') }}：</td>
            <td class="text-left-background-none">{{ basicInfo.spcialPlanI18n }}</td>
          </tr>
          <tr>
            <td class="text-right-background-color">{{ $t('scoreMangementBase.isInternationalStud') }}：</td>
            <td class="text-left-background-none">{{ basicInfo.isOverseasI18n }}</td>
            <td class="text-right-background-color"></td>
            <td class="text-left-background-none"></td>
          </tr>
        </tbody>
      </table>
    </el-card>
  </div>
</template>
<script>
import scoreManagementApi from 'common/src/api/scoreManagement/scoreManagement';
export default {
  components: {
  },
  data () {
    return {
      basicInfo: {}
    }
    
  },
  props: {
    detailInfo: {
      type: Object,
      default: () => {}
    }   
  },
  filters: {
  },
  created() {

  },
  mounted() {
    scoreManagementApi.queryStudentInfoByCode(this.detailInfo).then(res => {
      if (res.code === 200) {
        this.basicInfo = res.data
      }
    })
  },
  methods: {
    // 返回主页
    backToMain() {
      this.$emit('refresh-main-page')
    },
  }
}
</script>

<style lang="scss" scoped>
  .student-basic-info-container ::v-deep {
    .title {
      margin-bottom: 20px;
      font-weight: bold;
      font-size: 18px;
    }
    .table-style-baseinfos {
      border-collapse: collapse;
      table-layout: fixed;
      word-break: break-all;
      background-color: rgba(210, 212, 214, 1);
      border-width: 0.5px;
      border-style: solid;
      border-color: rgba(210, 212, 214, 1);
      width: 100%;
      font-weight: 401;
      font-style: normal;
      font-size: 14px;
      color: #8896a7;
      margin-bottom: 20px;
    }
    .table-style-baseinfos .text-right-background-color {
      background-color: #edf1f5;
      text-align: right;
    }
    .text-left-background-none {
      text-align: left;
    }
    .table-style-baseinfos td {
      width: 25%;
      background-color: rgba(255, 255, 255, 1);
      border-width: 0.5px;
      border-style: solid;
      border-color: rgba(210, 212, 214, 1);
      font-weight: 401;
      font-style: normal;
      font-size: 14px;
      color: #2b3b4e;
      height: 32px;
      padding: 0 10px;
    }
  }
</style>